﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using RuleCode.Table;

namespace map.member
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //页面类型:首页,商品页等等
            if (this.Request.Params["cbshoppageid"] == null)
            {
                //Response.Redirect(ResolveUrl("~/default.aspx"));
                Response.Redirect(this.Request.Url.ToString() + "?cbshoppageid=0");
            }
            ////用户编码
            //if (this.Request.Params["id"] == null)
            //{
            //    Response.Redirect(ResolveUrl("~/default.aspx"));
            //}
            //cbuser u = cbuser.Find(" recid = " + this.Request.Params["id"].ToString());
            cbuser u = cbuser.getcuruser();
            cbshoppage sp = cbshoppage.Find(" cbshoppageid = '"
                + cbshop.transhoppageid(this.Request.Params["cbshoppageid"].ToString())
                + "' and cbuserid = '" + u.cbuserid.ToString()+"'"
                );

            if (sp.cblanmu.ToString() == "三栏式")
            {
                string nurl = this.Request.Url.ToString().Replace("/default.aspx", "/default1.aspx");
                Response.Redirect(nurl);
            }
            if (sp.cblanmu.ToString() == "左边框")
            {
                string nurl = this.Request.Url.ToString().Replace("/default.aspx", "/default2.aspx");
                Response.Redirect(nurl);
            }
            if (sp.cblanmu.ToString() == "右边框")
            {
                string nurl = this.Request.Url.ToString().Replace("/default.aspx", "/default3.aspx");
                Response.Redirect(nurl);
            }
            if (sp.cblanmu.ToString() == "无边框")
            {
                string nurl = this.Request.Url.ToString().Replace("/default.aspx", "/default4.aspx");
                Response.Redirect(nurl);
            }
        }
    }
}
